package com.middleware.loaders;

import org.slf4j.Logger;

import java.io.IOException;
import java.util.Properties;

public class AppPropertiesLoader {

    private  static  final Logger log = org.slf4j.LoggerFactory.getLogger(AppPropertiesLoader.class);

    private final static Properties props;

    static {
        props = new Properties();
        try {
            props.load(AppPropertiesLoader.class.getClassLoader().getResourceAsStream("application.properties"));
        } catch (IOException e) {
            log.info("加载配置");
        }
    }


    public static String getProperty(String key) {
        return props.getProperty(key);
    }

}
